/*
 * @Author: xcl
 * @Date: 2022-04-20 10:16:41
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-09-20 09:05:08
 * @Description: vue基本配置
 */
module.exports = {
  lintOnSave: false,
  outputDir: "dist",
  assetsDir: "assets",
  publicPath: "./", // "./"：路由采用Hash模式
  // publicPath: "/SYS/",// "/"或者自定义的值：路由采用HTML5模式
  productionSourceMap: false,
  indexPath: "index.html",
  devServer: {
    disableHostCheck: true,
    // host: "localhost",
    host: "0.0.0.0",
    port: 5792,
    open: true,
    overlay: {
      warnings: false,
      errors: true,
    },
    proxy: { //配置跨域
      '/api': {
        target: 'http://api2.map.bdimg.com/customimage/', // 根路径
        changOrigin: true, //允许跨域
        pathRewrite: {
          '^/api': ''// 重写路径
        }
      },
      '/nn': {
        target: 'http://175.155.179.248:8252', // 根路径
        changOrigin: true, //允许跨域
        pathRewrite: {
          '^/nn': ''// 重写路径
        }
      },
    }
  },
  transpileDependencies: [
    // 解决IE浏览器得es6转换成es5得问题（IE报错缺少':'）
    /[/\\]node_modules[/\\]dom7[/\\]/,
    /[/\\]node_modules[/\\]swiper[/\\]/,
    /[/\\]node_modules[/\\]element-ui[/\\]packages[/\\]/,
    /[/\\]node_modules[/\\]element-ui[/\\]src[/\\]/,
    /[/\\]node_modules[/\\]capital-ui[/\\]src[/\\]/,
    /[/\\]node_modules[/\\]vux[/\\]/,
    // 解决IE浏览器得es6转换成es5得问题（IE语法错误，chunk-vendors.js）
    "vue",
    "@vue",
  ],
};